package cn.zl.ZLM.event.callback;

import cn.zl.ZLM.event.callback.impl.MKLogCallBack;
import cn.zl.ZLM.event.callback.impl.MKNoFoundCallBack;
import cn.zl.ZLM.event.callback.impl.MKNoReaderCallBack;
import cn.zl.ZLM.event.callback.impl.MKPlayCallBack;
import cn.zl.ZLM.event.callback.impl.MKPublishCallBack;
import cn.zl.ZLM.event.callback.impl.MKStreamChangeCallBack;
import cn.zl.ZLM.structure.MK_EVENTS;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;


@Component
public class CallBackEventsHander {

    @Resource
    private MKStreamChangeCallBack on_mk_media_changed;
    @Resource
    private MKPublishCallBack on_mk_media_publish;
    @Resource
    private MKNoReaderCallBack on_mk_media_no_reader;
//        ZLM_EVENT.on_mk_media_publish = iMKPublishCallBack;
    @Resource
    private MKNoFoundCallBack on_mk_media_not_found;
    //        ZLM_EVENT.on_mk_flow_report = iMKFlowReportCallBack;
    @Resource
    private MKPlayCallBack on_mk_media_play;
//        ZLM_EVENT.on_mk_http_access = new MKHttpAccessCallBack();
//        ZLM_EVENT.on_mk_http_request = new MKHttpRequestCallBack();
//        ZLM_EVENT.on_mk_http_access = new MKHttpAccessCallBack();
//        ZLM_EVENT.on_mk_http_before_access = new MKHttpBeforeAccessCallBack();
//        ZLM_EVENT.on_mk_record_mp4 = iMKRecordMp4CallBack;
//        ZLM_EVENT.on_mk_record_ts = iMKRecordTsCallBack;
    @Resource
    private MKLogCallBack on_mk_log;

    public MK_EVENTS get() {
        MK_EVENTS ZLM_EVENT = new MK_EVENTS();
        // 注册或反注册MediaSource事件广播
        ZLM_EVENT.on_mk_media_changed = on_mk_media_changed;
        ZLM_EVENT.on_mk_media_publish = on_mk_media_publish;
        ZLM_EVENT.on_mk_media_no_reader = on_mk_media_no_reader;
//        ZLM_EVENT.on_mk_media_publish = iMKPublishCallBack;
        ZLM_EVENT.on_mk_media_not_found = on_mk_media_not_found;
//        ZLM_EVENT.on_mk_flow_report = iMKFlowReportCallBack;
        ZLM_EVENT.on_mk_media_play = on_mk_media_play;
//        ZLM_EVENT.on_mk_http_access = new MKHttpAccessCallBack();
//        ZLM_EVENT.on_mk_http_request = new MKHttpRequestCallBack();
//        ZLM_EVENT.on_mk_http_access = new MKHttpAccessCallBack();
//        ZLM_EVENT.on_mk_http_before_access = new MKHttpBeforeAccessCallBack();
//        ZLM_EVENT.on_mk_record_mp4 = iMKRecordMp4CallBack;
//        ZLM_EVENT.on_mk_record_ts = iMKRecordTsCallBack;
        ZLM_EVENT.on_mk_log = on_mk_log;
        return ZLM_EVENT;
    }
}
